Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Bump cluster-api dependency to v1.5.0-beta.1 #1970

Merged
merged 12 commits into from
Jul 11, 2023

Conversation

chrischdi
Copy link
Member

@chrischdi chrischdi commented Jul 4, 2023

What this PR does / why we need it:

This patch bumps the CAPI module dependency to `v1.5.0-beta.0 to integrate the latest minor beta release of CAPI with the CAPV release.

I tried to make meaningful commits for better reviewability. Summary:

  • capi: bump go modules to v1.5.0-beta.0 and move kustomize out of hack/tools
    • Compiling kustomize broke with bumping the go modules.
    • Adopting the way upstream CAPI uses to build the kustomize binary instead.
  • controller-gen: Regenerate CRDs
  • controller-runtime: adopt webhook changes in apis/v1beta1
    • Webhooks are now able to return warning errors.
  • controller-runtime: fix unit-tests to due to new behavior of fake client
    • Fake client requires to have a finalizer set when a DeletionTimestamp is set on object creation.
  • controller-runtime: fix CRD detection in main.go
    • The returned errors of controller-runtime did change so the detection did not work anymore.
  • controller-runtime: use WithStatusSubresource when initializing fake-client for objects we update .status
  • controller-runtime: fix context and watch source handling
  • math/rand: fix usage
    • Beginning with Go 1.20 rand gets auto-seeded on startup.
  • Adjust to not use deprecated fields and properties
  • nolint: use nolint:all to prevent gofmt of indenting it which makes lint cry

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1969

Special notes for your reviewer:

n/a

Release note:

Bump cluster-api dependency to v1.4.1

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 4, 2023
@k8s-ci-robot k8s-ci-robot requested a review from MaxRink July 4, 2023 08:07
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 4, 2023
@k8s-ci-robot k8s-ci-robot requested a review from srm09 July 4, 2023 08:07
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 4, 2023
@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-verify-crds

@chrischdi
Copy link
Member Author

/retest

@chrischdi
Copy link
Member Author

Note: I'm not clear yet how flaky the existing tests are or if it is the PR.

@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-integration-test

@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-integration-test
/test pull-cluster-api-provider-vsphere-test

@chrischdi chrischdi force-pushed the bump-capi-v1-5-beta branch 2 times, most recently from 1c575d4 to e8609c3 Compare July 6, 2023 04:56
@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-verify-gen

@chrischdi
Copy link
Member Author

/test help

@k8s-ci-robot
Copy link
Contributor

@chrischdi: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-vsphere-e2e
  • /test pull-cluster-api-provider-vsphere-full-e2e
  • /test pull-cluster-api-provider-vsphere-integration-test
  • /test pull-cluster-api-provider-vsphere-test
  • /test pull-cluster-api-provider-vsphere-verify-markdown
  • /test pull-cluster-api-provider-vsphere-verify-shell

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-vsphere-apidiff-main
  • /test pull-cluster-api-provider-vsphere-verify-crds
  • /test pull-cluster-api-provider-vsphere-verify-gen

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-vsphere-apidiff-main
  • pull-cluster-api-provider-vsphere-e2e
  • pull-cluster-api-provider-vsphere-integration-test
  • pull-cluster-api-provider-vsphere-test
  • pull-cluster-api-provider-vsphere-verify-crds
  • pull-cluster-api-provider-vsphere-verify-gen
  • pull-cluster-api-provider-vsphere-verify-shell

In response to this:

/test help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-full-e2e

@chrischdi chrischdi changed the title [WIP] ✨ Bump cluster-api dependency to v1.5.0-beta.0 ✨ Bump cluster-api dependency to v1.5.0-beta.0 Jul 6, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 6, 2023
@chrischdi
Copy link
Member Author

@chrischdi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-apidiff-main a67c467 link false /test pull-cluster-api-provider-vsphere-apidiff-main
pull-cluster-api-provider-vsphere-test a67c467 link true /test pull-cluster-api-provider-vsphere-test
pull-cluster-api-provider-vsphere-full-e2e a67c467 link true /test pull-cluster-api-provider-vsphere-full-e2e
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Failure of capv-e2e: [It] Cluster creation with anti affined nodes should create a cluster with anti-affined nodes which is also red on testgrid's periodic-main-e2e already for a longer time.

@chrischdi chrischdi changed the title ✨ Bump cluster-api dependency to v1.5.0-beta.0 ✨ Bump cluster-api dependency to v1.5.0-beta.1 Jul 6, 2023
@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-full-e2e

@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-verify-gen

@chrischdi
Copy link
Member Author

@chrischdi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-apidiff-main 05dc4f3 link false /test pull-cluster-api-provider-vsphere-apidiff-main
pull-cluster-api-provider-vsphere-full-e2e 05dc4f3 link true /test pull-cluster-api-provider-vsphere-full-e2e
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

CI looks good.

  • apidiff failure is expected.
  • pull-cluster-api-provider-vsphere-full-e2e:
    • Only fails in branch capv-e2e: [It] Cluster creation with anti affined nodes should create a cluster with anti-affined nodes
    • This one is also red on main.

@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-full-e2e

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New to CAPV, but from a CAPI/CR perspective overall this looks good

controllers/vmware/vspherecluster_reconciler_test.go Outdated Show resolved Hide resolved
controllers/vspheremachine_controller.go Outdated Show resolved Hide resolved
go.mod Outdated
@@ -1,18 +1,18 @@
module sigs.k8s.io/cluster-api-provider-vsphere

go 1.19
go 1.20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough about CAPV yet, but this usually requires bumping images used in Prow. Let's check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid point. Checked in test-infra:

The used images provide go 1.19.9.

So I reverted the go.mod version change for now. Let's keep this separately.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you open a follow-up issue to track this, please?

hack/go-install.sh Outdated Show resolved Hide resolved
main.go Outdated
@@ -368,3 +372,22 @@ func runProfiler(addr string) {
setupLog.Error(err, "problem running profiler server")
}
}

func isCRDLoaded(mgr ctrlmgr.Manager, gvr schema.GroupVersionResource) (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe isCRDDeployed would be better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have e2e coverage that this new check works?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is found very fast, because the controller won't get added and e2e tests would fail. (That's also how I recognized it).

Do you think that's already sufficient?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly wondering if we have e2e tests for both cases (now especially supervisor :D).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be good. I guess we have at least test coverage for the first case and if it works there it should also work for supervisor

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both cases are tested:

For supervisor: via make test-integration.

For non-supervisor: via make e2e.

@randomvariable
Copy link
Member

Going to close out remaining dependabot PRs.

Can we therefore get the following in?

  • Bump golang.org/x/mod from 0.10.0 to 0.12.0
  • Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
  • Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0

@chrischdi
Copy link
Member Author

Going to close out remaining dependabot PRs.

Can we therefore get the following in?

  • Bump golang.org/x/mod from 0.10.0 to 0.12.0
  • Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
  • Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0

bumped all three with the new commit.

@chrischdi
Copy link
Member Author

/test pull-cluster-api-provider-vsphere-verify-crds

1 similar comment
@randomvariable
Copy link
Member

/test pull-cluster-api-provider-vsphere-verify-crds

@chrischdi
Copy link
Member Author

Let's rebase again :P

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 11, 2023
…/tools

Compiling kustomize broke with bumping the go modules.
Adopting the way upstream CAPI uses to build the kustomize binary instead.
Webhooks are now able to return warning errors.
Fake client requires to have a finalizer set when a DeletionTimestamp is set on object creation.
The returned errors of controller-runtime did change so the detection did not work anymore.
Beginning with Go 1.20 rand gets auto-seeded on startup.
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 11, 2023
@k8s-ci-robot
Copy link
Contributor

@chrischdi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-full-e2e 6f39787 link true /test pull-cluster-api-provider-vsphere-full-e2e
pull-cluster-api-provider-vsphere-apidiff-main 7805709 link false /test pull-cluster-api-provider-vsphere-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sbueringer
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 11, 2023
@randomvariable
Copy link
Member

/approve
/retest-required

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: randomvariable

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 11, 2023
@k8s-ci-robot k8s-ci-robot merged commit 6d70d7e into kubernetes-sigs:main Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CAPI v1.5.0-beta.0 has been released and is ready for testing
6 participants